﻿
/*让某表里的checkbox全部选中或取消选中*/

function selectAllcheckbox(table, dom) {
    var myTable = document.getElementById(table);
    var objs = myTable.getElementsByTagName("input");
    for (var i = 0; i < objs.length; i++) {
        if (objs[i].type.toLowerCase() == "checkbox")
            objs[i].checked = dom.checked;
    }
}
